package com.ruoyi.web.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.web.domain.Drugdictionary;
import com.ruoyi.web.mapper.DrugdictionaryMapper;
import com.ruoyi.web.service.IDrugdictionaryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class IDrugdictionaryServiceImpl extends ServiceImpl<DrugdictionaryMapper, Drugdictionary> implements IDrugdictionaryService {
    @Autowired
    private DrugdictionaryMapper drugdictionaryMapper;

    /**
     * 查询药品清单
     */
    @Override
    public Drugdictionary selectDrugdictionaryByDrugid(Long drugid) {
        return drugdictionaryMapper.selectDrugdictionaryByDrugid(drugid);
    }

    /**
     * 查询药品清单列表
     *
     * @param drugdictionary 药品清单
     * @return 药品清单
     */
    @Override
    public List<Drugdictionary> selectDrugdictionaryList(Drugdictionary drugdictionary)
    {
        return drugdictionaryMapper.selectDrugdictionaryList(drugdictionary);
    }

    /**
     * 新增药品清单
     *
     * @param drugdictionary 药品清单
     * @return 结果
     */
    @Override
    public int insertDrugdictionary(Drugdictionary drugdictionary)
    {
        return drugdictionaryMapper.insertDrugdictionary(drugdictionary);
    }

    /**
     * 修改药品清单
     *
     * @param drugdictionary 药品清单
     * @return 结果
     */
    @Override
    public int updateDrugdictionary(Drugdictionary drugdictionary)
    {
        return drugdictionaryMapper.updateDrugdictionary(drugdictionary);
    }

    @Override
    public int deleteDrugdictionaryByDrugid(Long drugid) {
        return drugdictionaryMapper.deleteDrugdictionaryByDrugid(drugid);
    }

    @Override
    public int deleteDrugdictionaryByDrugids(Long[] drugids) {
        return drugdictionaryMapper.deleteDrugdictionaryByDrugids(drugids);
    }
}
